<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Distribution.Pretty</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-2"></span><span>    </span><span class="annot"><a href="Distribution.Pretty.html#Pretty"><span class="hs-identifier">Pretty</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-3"></span><span>    </span><span class="annot"><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier">prettyShow</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-4"></span><span>    </span><span class="annot"><a href="Distribution.Pretty.html#defaultStyle"><span class="hs-identifier">defaultStyle</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-5"></span><span>    </span><span class="annot"><a href="Distribution.Pretty.html#flatStyle"><span class="hs-identifier">flatStyle</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-6"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Utilities</span></span><span>
</span><span id="line-7"></span><span>    </span><span class="annot"><a href="Distribution.Pretty.html#showFilePath"><span class="hs-identifier">showFilePath</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-8"></span><span>    </span><span class="annot"><a href="Distribution.Pretty.html#showToken"><span class="hs-identifier">showToken</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-9"></span><span>    </span><span class="annot"><a href="Distribution.Pretty.html#showFreeText"><span class="hs-identifier">showFreeText</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-10"></span><span>    </span><span class="annot"><a href="Distribution.Pretty.html#showFreeTextV3"><span class="hs-identifier">showFreeTextV3</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-11"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Deprecated</span></span><span>
</span><span id="line-12"></span><span>    </span><span class="annot"><a href="Distribution.Pretty.html#Separator"><span class="hs-identifier">Separator</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-13"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-14"></span><span>
</span><span id="line-15"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.CabalSpecVersion.html"><span class="hs-identifier">Distribution.CabalSpecVersion</span></a></span><span>
</span><span id="line-16"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.Prelude.html"><span class="hs-identifier">Distribution.Compat.Prelude</span></a></span><span>
</span><span id="line-17"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-18"></span><span>
</span><span id="line-19"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../pretty/src/Text.PrettyPrint.html#"><span class="hs-identifier">Text.PrettyPrint</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">PP</span></span><span>
</span><span id="line-20"></span><span>
</span><span id="line-21"></span><span class="hs-keyword">class</span><span> </span><span id="Pretty"><span class="annot"><a href="Distribution.Pretty.html#Pretty"><span class="hs-identifier hs-var">Pretty</span></a></span></span><span> </span><span id="local-6989586621679628394"><span class="annot"><a href="#local-6989586621679628394"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-22"></span><span>    </span><span id="pretty"><span class="annot"><a href="Distribution.Pretty.html#pretty"><span class="hs-identifier hs-type">pretty</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679628394"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#Doc"><span class="hs-identifier hs-type">PP.Doc</span></a></span><span>
</span><span id="line-23"></span><span>
</span><span id="line-24"></span><span>    </span><span id="prettyVersioned"><span class="annot"><a href="Distribution.Pretty.html#prettyVersioned"><span class="hs-identifier hs-type">prettyVersioned</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.CabalSpecVersion.html#CabalSpecVersion"><span class="hs-identifier hs-type">CabalSpecVersion</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679628394"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#Doc"><span class="hs-identifier hs-type">PP.Doc</span></a></span><span>
</span><span id="line-25"></span><span>    </span><span id="local-6989586621679628332"><span class="annot"><a href="Distribution.Pretty.html#prettyVersioned"><span class="hs-identifier hs-var hs-var">prettyVersioned</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Doc
forall a. Pretty a =&gt; a -&gt; Doc
</span><a href="Distribution.Pretty.html#pretty"><span class="hs-identifier hs-var">pretty</span></a></span></span><span>
</span><span id="line-26"></span><span>
</span><span id="line-27"></span><span class="hs-comment">-- | @since 3.4.0.0</span><span>
</span><span id="line-28"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679628328"><span class="annot"><a href="Distribution.Pretty.html#Pretty"><span class="hs-identifier hs-type">Pretty</span></a></span><span> </span><span class="annot"><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#Doc"><span class="hs-identifier hs-type">PP.Doc</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-29"></span><span>    </span><span id="local-6989586621679628326"><span class="annot"><span class="annottext">pretty :: Doc -&gt; Doc
</span><a href="#local-6989586621679628326"><span class="hs-identifier hs-var hs-var hs-var hs-var">pretty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-30"></span><span>
</span><span id="line-31"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679628322"><span class="annot"><a href="Distribution.Pretty.html#Pretty"><span class="hs-identifier hs-type">Pretty</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-32"></span><span>    </span><span id="local-6989586621679628319"><span class="annot"><span class="annottext">pretty :: Bool -&gt; Doc
</span><a href="#local-6989586621679628319"><span class="hs-identifier hs-var hs-var hs-var hs-var">pretty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">PP.text</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; Doc) -&gt; (Bool -&gt; String) -&gt; Bool -&gt; Doc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span>
</span><span id="line-33"></span><span>
</span><span id="line-34"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679628313"><span class="annot"><a href="Distribution.Pretty.html#Pretty"><span class="hs-identifier hs-type">Pretty</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-35"></span><span>    </span><span id="local-6989586621679628310"><span class="annot"><span class="annottext">pretty :: Int -&gt; Doc
</span><a href="#local-6989586621679628310"><span class="hs-identifier hs-var hs-var hs-var hs-var">pretty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">PP.text</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; Doc) -&gt; (Int -&gt; String) -&gt; Int -&gt; Doc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span>
</span><span id="line-36"></span><span>
</span><span id="line-37"></span><span id="local-6989586621679628388"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679628307"><span class="annot"><a href="Distribution.Pretty.html#Pretty"><span class="hs-identifier hs-type">Pretty</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679628388"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Distribution.Pretty.html#Pretty"><span class="hs-identifier hs-type">Pretty</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Functor.Identity.html#Identity"><span class="hs-identifier hs-type">Identity</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679628388"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-38"></span><span>    </span><span id="local-6989586621679628305"><span class="annot"><span class="annottext">pretty :: Identity a -&gt; Doc
</span><a href="#local-6989586621679628305"><span class="hs-identifier hs-var hs-var hs-var hs-var">pretty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Doc
forall a. Pretty a =&gt; a -&gt; Doc
</span><a href="Distribution.Pretty.html#pretty"><span class="hs-identifier hs-var">pretty</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; Doc) -&gt; (Identity a -&gt; a) -&gt; Identity a -&gt; Doc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Identity a -&gt; a
forall a. Identity a -&gt; a
</span><a href="../../base/src/Data.Functor.Identity.html#runIdentity"><span class="hs-identifier hs-var hs-var">runIdentity</span></a></span></span><span>
</span><span id="line-39"></span><span>
</span><span id="line-40"></span><span id="local-6989586621679628386"><span class="annot"><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-type">prettyShow</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Pretty.html#Pretty"><span class="hs-identifier hs-type">Pretty</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679628386"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679628386"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span></span><span>
</span><span id="line-41"></span><span id="prettyShow"><span class="annot"><span class="annottext">prettyShow :: forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var hs-var">prettyShow</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Style -&gt; Doc -&gt; String
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#renderStyle"><span class="hs-identifier hs-var">PP.renderStyle</span></a></span><span> </span><span class="annot"><span class="annottext">Style
</span><a href="Distribution.Pretty.html#defaultStyle"><span class="hs-identifier hs-var">defaultStyle</span></a></span><span> </span><span class="annot"><span class="annottext">(Doc -&gt; String) -&gt; (a -&gt; Doc) -&gt; a -&gt; String
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Doc
forall a. Pretty a =&gt; a -&gt; Doc
</span><a href="Distribution.Pretty.html#pretty"><span class="hs-identifier hs-var">pretty</span></a></span><span>
</span><span id="line-42"></span><span>
</span><span id="line-43"></span><span class="hs-comment">-- | The default rendering style used in Cabal for console</span><span>
</span><span id="line-44"></span><span class="hs-comment">-- output. It has a fixed page width and adds line breaks</span><span>
</span><span id="line-45"></span><span class="hs-comment">-- automatically.</span><span>
</span><span id="line-46"></span><span class="annot"><a href="Distribution.Pretty.html#defaultStyle"><span class="hs-identifier hs-type">defaultStyle</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../pretty/src/Text.PrettyPrint.Annotated.HughesPJ.html#Style"><span class="hs-identifier hs-type">PP.Style</span></a></span><span>
</span><span id="line-47"></span><span id="defaultStyle"><span class="annot"><span class="annottext">defaultStyle :: Style
</span><a href="Distribution.Pretty.html#defaultStyle"><span class="hs-identifier hs-var hs-var">defaultStyle</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Style :: Mode -&gt; Int -&gt; Float -&gt; Style
</span><a href="../../pretty/src/Text.PrettyPrint.Annotated.HughesPJ.html#Style"><span class="hs-identifier hs-type">PP.Style</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">mode :: Mode
</span><a href="../../pretty/src/Text.PrettyPrint.Annotated.HughesPJ.html#mode"><span class="hs-identifier hs-var">PP.mode</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Mode
</span><a href="../../pretty/src/Text.PrettyPrint.Annotated.HughesPJ.html#PageMode"><span class="hs-identifier hs-var">PP.PageMode</span></a></span><span>
</span><span id="line-48"></span><span>                          </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">lineLength :: Int
</span><a href="../../pretty/src/Text.PrettyPrint.Annotated.HughesPJ.html#lineLength"><span class="hs-identifier hs-var">PP.lineLength</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">79</span></span><span>
</span><span id="line-49"></span><span>                          </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ribbonsPerLine :: Float
</span><a href="../../pretty/src/Text.PrettyPrint.Annotated.HughesPJ.html#ribbonsPerLine"><span class="hs-identifier hs-var">PP.ribbonsPerLine</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float
</span><span class="hs-number">1.0</span></span><span>
</span><span id="line-50"></span><span>                          </span><span class="hs-special">}</span><span>
</span><span id="line-51"></span><span>
</span><span id="line-52"></span><span class="hs-comment">-- | A style for rendering all on one line.</span><span>
</span><span id="line-53"></span><span class="annot"><a href="Distribution.Pretty.html#flatStyle"><span class="hs-identifier hs-type">flatStyle</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../pretty/src/Text.PrettyPrint.Annotated.HughesPJ.html#Style"><span class="hs-identifier hs-type">PP.Style</span></a></span><span>
</span><span id="line-54"></span><span id="flatStyle"><span class="annot"><span class="annottext">flatStyle :: Style
</span><a href="Distribution.Pretty.html#flatStyle"><span class="hs-identifier hs-var hs-var">flatStyle</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Style :: Mode -&gt; Int -&gt; Float -&gt; Style
</span><a href="../../pretty/src/Text.PrettyPrint.Annotated.HughesPJ.html#Style"><span class="hs-identifier hs-type">PP.Style</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">mode :: Mode
</span><a href="../../pretty/src/Text.PrettyPrint.Annotated.HughesPJ.html#mode"><span class="hs-identifier hs-var">PP.mode</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Mode
</span><a href="../../pretty/src/Text.PrettyPrint.Annotated.HughesPJ.html#LeftMode"><span class="hs-identifier hs-var">PP.LeftMode</span></a></span><span>
</span><span id="line-55"></span><span>                       </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">lineLength :: Int
</span><a href="../../pretty/src/Text.PrettyPrint.Annotated.HughesPJ.html#lineLength"><span class="hs-identifier hs-var">PP.lineLength</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Int
forall {a}. String -&gt; a
</span><a href="#local-6989586621679628294"><span class="hs-identifier hs-var">err</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;lineLength&quot;</span></span><span>
</span><span id="line-56"></span><span>                       </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ribbonsPerLine :: Float
</span><a href="../../pretty/src/Text.PrettyPrint.Annotated.HughesPJ.html#ribbonsPerLine"><span class="hs-identifier hs-var">PP.ribbonsPerLine</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Float
forall {a}. String -&gt; a
</span><a href="#local-6989586621679628294"><span class="hs-identifier hs-var">err</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ribbonsPerLine&quot;</span></span><span>
</span><span id="line-57"></span><span>                       </span><span class="hs-special">}</span><span>
</span><span id="line-58"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-59"></span><span>    </span><span id="local-6989586621679628294"><span class="annot"><span class="annottext">err :: String -&gt; a
</span><a href="#local-6989586621679628294"><span class="hs-identifier hs-var hs-var">err</span></a></span></span><span> </span><span id="local-6989586621679628291"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679628291"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; a
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;flatStyle: tried to access &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679628291"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; in LeftMode. &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-60"></span><span>                   </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;This should never happen and indicates a bug in Cabal.&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-61"></span><span>
</span><span id="line-62"></span><span class="hs-comment">-------------------------------------------------------------------------------</span><span>
</span><span id="line-63"></span><span class="hs-comment">-- Utilities</span><span>
</span><span id="line-64"></span><span class="hs-comment">-------------------------------------------------------------------------------</span><span>
</span><span id="line-65"></span><span>
</span><span id="line-66"></span><span class="hs-comment">-- TODO: remove when ReadP parser is gone.</span><span>
</span><span id="line-67"></span><span class="hs-keyword">type</span><span> </span><span id="Separator"><span class="annot"><a href="Distribution.Pretty.html#Separator"><span class="hs-identifier hs-var">Separator</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#Doc"><span class="hs-identifier hs-type">PP.Doc</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#Doc"><span class="hs-identifier hs-type">PP.Doc</span></a></span><span>
</span><span id="line-68"></span><span>
</span><span id="line-69"></span><span class="annot"><a href="Distribution.Pretty.html#showFilePath"><span class="hs-identifier hs-type">showFilePath</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#Doc"><span class="hs-identifier hs-type">PP.Doc</span></a></span><span>
</span><span id="line-70"></span><span id="showFilePath"><span class="annot"><span class="annottext">showFilePath :: String -&gt; Doc
</span><a href="Distribution.Pretty.html#showFilePath"><span class="hs-identifier hs-var hs-var">showFilePath</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="Distribution.Pretty.html#showToken"><span class="hs-identifier hs-var">showToken</span></a></span><span>
</span><span id="line-71"></span><span>
</span><span id="line-72"></span><span class="annot"><a href="Distribution.Pretty.html#showToken"><span class="hs-identifier hs-type">showToken</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#Doc"><span class="hs-identifier hs-type">PP.Doc</span></a></span><span>
</span><span id="line-73"></span><span id="showToken"><span class="annot"><span class="annottext">showToken :: String -&gt; Doc
</span><a href="Distribution.Pretty.html#showToken"><span class="hs-identifier hs-var hs-var">showToken</span></a></span></span><span> </span><span id="local-6989586621679628288"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679628288"><span class="hs-identifier hs-var">str</span></a></span></span><span>
</span><span id="line-74"></span><span>    </span><span class="hs-comment">-- if token looks like a comment (starts with --), print it in quotes</span><span>
</span><span id="line-75"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; Bool
forall a. Eq a =&gt; [a] -&gt; [a] -&gt; Bool
</span><a href="../../base/src/Data.OldList.html#isPrefixOf"><span class="hs-operator hs-var">`isPrefixOf`</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679628288"><span class="hs-identifier hs-var">str</span></a></span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">PP.text</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679628288"><span class="hs-identifier hs-var">str</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-76"></span><span>    </span><span class="hs-comment">-- also if token ends with a colon (e.g. executable name), print it in quotes</span><span>
</span><span id="line-77"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;:&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; Bool
forall a. Eq a =&gt; [a] -&gt; [a] -&gt; Bool
</span><a href="../../base/src/Data.OldList.html#isSuffixOf"><span class="hs-operator hs-var">`isSuffixOf`</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679628288"><span class="hs-identifier hs-var">str</span></a></span><span>                  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">PP.text</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679628288"><span class="hs-identifier hs-var">str</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-78"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; String -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#any"><span class="hs-identifier hs-var">any</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679628283"><span class="hs-identifier hs-var">dodgy</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679628288"><span class="hs-identifier hs-var">str</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679628288"><span class="hs-identifier hs-var">str</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">PP.text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679628288"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-79"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">PP.text</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679628288"><span class="hs-identifier hs-var">str</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-80"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-81"></span><span>    </span><span id="local-6989586621679628283"><span class="annot"><span class="annottext">dodgy :: Char -&gt; Bool
</span><a href="#local-6989586621679628283"><span class="hs-identifier hs-var hs-var">dodgy</span></a></span></span><span> </span><span id="local-6989586621679628279"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679628279"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/GHC.Unicode.html#isSpace"><span class="hs-identifier hs-var">isSpace</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679628279"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679628279"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">','</span></span><span>
</span><span id="line-82"></span><span>
</span><span id="line-83"></span><span>
</span><span id="line-84"></span><span class="hs-comment">-- | Pretty-print free-format text, ensuring that it is vertically aligned,</span><span>
</span><span id="line-85"></span><span class="hs-comment">-- and with blank lines replaced by dots for correct re-parsing.</span><span>
</span><span id="line-86"></span><span class="annot"><a href="Distribution.Pretty.html#showFreeText"><span class="hs-identifier hs-type">showFreeText</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#Doc"><span class="hs-identifier hs-type">PP.Doc</span></a></span><span>
</span><span id="line-87"></span><span id="showFreeText"><span class="annot"><span class="annottext">showFreeText :: String -&gt; Doc
</span><a href="Distribution.Pretty.html#showFreeText"><span class="hs-identifier hs-var hs-var">showFreeText</span></a></span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span>
</span><span id="line-88"></span><span class="annot"><a href="Distribution.Pretty.html#showFreeText"><span class="hs-identifier hs-var">showFreeText</span></a></span><span> </span><span id="local-6989586621679628276"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679628276"><span class="hs-identifier hs-var">s</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Doc] -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#vcat"><span class="hs-identifier hs-var">PP.vcat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">PP.text</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679628274"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.&quot;</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679628274"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679628274"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679628274"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; [String]
</span><a href="Distribution.Pretty.html#lines_"><span class="hs-identifier hs-var">lines_</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679628276"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-89"></span><span>
</span><span id="line-90"></span><span class="hs-comment">-- | Pretty-print free-format text.</span><span>
</span><span id="line-91"></span><span class="hs-comment">-- Since @cabal-version: 3.0@ we don't replace blank lines with dots.</span><span>
</span><span id="line-92"></span><span class="hs-comment">--</span><span>
</span><span id="line-93"></span><span class="hs-comment">-- @since 3.0.0.0</span><span>
</span><span id="line-94"></span><span class="annot"><a href="Distribution.Pretty.html#showFreeTextV3"><span class="hs-identifier hs-type">showFreeTextV3</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#Doc"><span class="hs-identifier hs-type">PP.Doc</span></a></span><span>
</span><span id="line-95"></span><span id="showFreeTextV3"><span class="annot"><span class="annottext">showFreeTextV3 :: String -&gt; Doc
</span><a href="Distribution.Pretty.html#showFreeTextV3"><span class="hs-identifier hs-var hs-var">showFreeTextV3</span></a></span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span>
</span><span id="line-96"></span><span class="annot"><a href="Distribution.Pretty.html#showFreeTextV3"><span class="hs-identifier hs-var">showFreeTextV3</span></a></span><span> </span><span id="local-6989586621679628272"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679628272"><span class="hs-identifier hs-var">s</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Doc] -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#vcat"><span class="hs-identifier hs-var">PP.vcat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">PP.text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679628271"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679628271"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679628271"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; [String]
</span><a href="Distribution.Pretty.html#lines_"><span class="hs-identifier hs-var">lines_</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679628272"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-97"></span><span>
</span><span id="line-98"></span><span class="hs-comment">-- | 'lines_' breaks a string up into a list of strings at newline</span><span>
</span><span id="line-99"></span><span class="hs-comment">-- characters.  The resulting strings do not contain newlines.</span><span>
</span><span id="line-100"></span><span class="annot"><a href="Distribution.Pretty.html#lines_"><span class="hs-identifier hs-type">lines_</span></a></span><span>                   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-101"></span><span id="lines_"><span class="annot"><span class="annottext">lines_ :: String -&gt; [String]
</span><a href="Distribution.Pretty.html#lines_"><span class="hs-identifier hs-var hs-var">lines_</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-102"></span><span class="annot"><a href="Distribution.Pretty.html#lines_"><span class="hs-identifier hs-var">lines_</span></a></span><span> </span><span id="local-6989586621679628270"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679628270"><span class="hs-identifier hs-var">s</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span>
</span><span id="line-103"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679628268"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679628268"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679628267"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679628267"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; String -&gt; (String, String)
forall a. (a -&gt; Bool) -&gt; [a] -&gt; ([a], [a])
</span><a href="../../base/src/GHC.List.html#break"><span class="hs-identifier hs-var">break</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\n'</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679628270"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-104"></span><span>    </span><span class="hs-keyword">in</span><span>  </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679628268"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679628267"><span class="hs-identifier hs-var">s'</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-105"></span><span>        </span><span class="hs-special">[</span><span class="hs-special">]</span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-106"></span><span>        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679628265"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679628265"><span class="hs-identifier hs-var">s''</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; [String]
</span><a href="Distribution.Pretty.html#lines_"><span class="hs-identifier hs-var">lines_</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679628265"><span class="hs-identifier hs-var">s''</span></a></span><span>
</span><span id="line-107"></span></pre></body></html>